/*
 * @Description: 加载动画封装
 * @Version: 2.0
 * @Author: Kristen
 * @Date: 2022-07-21 14:16:56
 */

export function loading(callback) {
    const loadingInstance = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(255, 255, 255, .5)'
    })
    setTimeout(() => {
        if (callback) callback()
        loadingInstance.close();
    }, 500)
}